import request from '@/libs/request.js'


export function getFtp() {
  return request({
    url: '/inputManage/zsFtp/query',
    method: 'post'
  })
}

export function updateFtp(data) {
  return request({
    url: '/inputManage/zsFtp/update',
    method: 'post',
    data
  })
}

export function fetchDocument() {
  return request({
    url: '/inputManage/zsIncomeDocument/fetchDocument ',
    method: 'post',

  })
}


export function getDocById(docId) {
  return request({
    url: '/inputManage/zsIncomeDocument/getDocById',
    method: 'post',
    params: {
      docId: docId
    }
  })
}


export function getDocFetchLog(data) {
  return request({
    url: '/inputManage/zsDocFetchLog/pageQuery ',
    method: 'post',
    data
  })
}

export function getDocList(data) {
  return request({
    url: '/inputManage/zsIncomeDocument/pageQuery ',
    method: 'post',
    data
  })
}

/**
 * 住商电子 进项发票查询
 * @param {*} data 
 * @returns 
 */
export function getInvList(data) {
  return request({
    url: '/inputManage/zsInv/pageQuery ',
    method: 'post',
    data
  })
}

/**
 * 住商电子 单张发票详情查询
 * @param {*} data 
 * @returns 
 */
export function getInvInfo(data) {
  return request({
    url: '/inputManage/zsInv/invInfo ',
    method: 'post',
    data
  })
}

/**
 * 住商电子 计算待抵扣发票数据（数量、金额、税额）合计值
 * 
 * @returns 
 */
export function calcInv() {
  return request({
    url: '/inputManage/zsInv/calcInv ',
    method: 'post',
  })
}


/**
 * 住商电子 发票勾选
 * 
 * @returns 
 */
export function deduction(data) {
  return request({
    url: '/inputManage/zsInv/deduction ',
    method: 'post',
    data
  })
}


/**
 * 住商电子 获取可匹配的发票
 * 
 * @returns 
 */
export function matchInvList(data) {
  return request({
    url: '/inputManage/zsInv/matchInvList',
    method: 'post',
    data
  })
}

export function getSum(data) {
  return request({
    url: '/inputManage/zsInv/getSum',
    method: 'post',
    data
  })
}


export function docInvList(data) {
  return request({
    url: '/inputManage/zsInv/docInvList',
    method: 'post',
    data
  })
}

export function getOtherDocument(data) {
  return request({
    url: '/inputManage/zsInv/getOtherDocument',
    method: 'post',
    data
  })
}

export function ppOriginAmount(data) {
  return request({
    url: '/inputManage/zsInv/searchOriginAmount',
    method: 'post',
    data
  })
}



/**
 * 住商电子-单据自动匹配
 * @returns 
 */
export function autoMatch(data) {
  return request({
    url: '/inputManage/zsInvDoc/autoMatch',
    method: 'post',
    data
  })
}

/**
 * 住商电子--单据手动匹配
 * @param {*} data 
 * @returns 
 */
export function doMatch(data) {
  return request({
    url: '/inputManage/zsInvDoc/doMatch',
    method: 'post',
    data
  })
}

/**
 * 住商电子--单据强制匹配
 * @param {*} data 
 * @returns 
 */
export function forceMatch(data) {
  return request({
    url: '/inputManage/zsInvDoc/forceMatch',
    method: 'post',
    data
  })
}


/**
 * 住商电子--撤销匹配（批量）
 * @param {*} data 
 * @returns 
 */
export function cancelMatch(data) {
  return request({
    url: '/inputManage/zsInvDoc/cancelMatch',
    method: 'post',
    data
  })
}

/**
 * 住商电子--撤销匹配（批量）
 * @param {*} data 
 * @returns 
 */
export function cancelMatchOne(data) {
  return request({
    url: '/inputManage/zsInvDoc/cancelMatchOne',
    method: 'post',
    data
  })
}


/**
 * 住商电子--立即回传
 * @param {*} data 
 * @returns 
 */
export function feedback(data) {
  return request({
    url: '/inputManage/zsIncomeDocument/feedback',
    method: 'post',
    data
  })
}

feedback
